/*
package net.csdn.business.common.feign.handle;

import cn.hutool.http.ContentType;
import cn.hutool.json.JSONUtil;
import com.alibaba.csp.sentinel.adapter.spring.webmvc.callback.BlockExceptionHandler;
import com.alibaba.csp.sentinel.slots.block.BlockException;
import lombok.extern.slf4j.Slf4j;
import org.springframework.http.HttpStatus;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


*/
/**
 * @Desc: Sentinel降级、限流策略Handler
 * @ClassName: CloudUrlBlockHandler
 * @Author: zhangyl
 * @Date: 2022/12/20 16:00
 *//*

@Slf4j
public class CloudUrlBlockHandler implements BlockExceptionHandler {

	@Override
	public void handle(HttpServletRequest request, HttpServletResponse response, BlockException e) throws Exception {
		log.error("sentinel降级资源名称{}:{}", e.getRule().getResource(), e);
		response.setContentType(ContentType.JSON.toString());
		response.setStatus(HttpStatus.TOO_MANY_REQUESTS.value());
		response.getWriter().print(JSONUtil.toJsonStr(e.getMessage()));
	}

}
*/
